#include <iostream>
#define N 100

using namespace std;

void readintVector(char array[], int elements){
for (int i=0; i<elements; i++){
	cout<<"a["<<i<<"]=";
	cin>>array[i];
	cout<<"\n";}
}

int distinct_letters(char array[], int elements){
int i, j;
for(i=0;i<elements;i++)
	for (j=i+1;j<elements;++j)
		if(array[j]==array[i])
			return 0;
return 1;			
}


int main(){
char array[N];
int x=0;
int elements;
cout<<"Type the number of letters the word contains: ";
cin>>elements;
readintVector(array, elements);
cout<<"The word is ";
for(int i=0; i<elements; i++){
	cout<<array[i]<<" ";}
cout<<endl;

if (distinct_letters(array, elements)!=0)
	cout<<"The word has distinct letters\n";
else 
	cout<<"The word doesn't have distinct letters\n";
return 0;
}
